package com.example.demo.aop;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

//@EnableAspectJAutoProxy
@ComponentScan("com.example.demo.aop")
public class AopTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext annotion = new AnnotationConfigApplicationContext(AopTest.class);
        AopService aopService = annotion.getBean(AopService.class);
        aopService.speak();
    }
}
